<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/goods_return_note.css"/>
    <title>我的订货郎</title>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a>订单</a>><a class="now">退货单详情</a>
            </p>
            <div class="content">
                <div class="detail-block">
                    <div class="top-title clearfix">
                        <p>【${returnBill.state}】</p>
                        <p><span>订单号：</span>DH${returnBill.orderCode}</p>
                        <p><span>退单号：</span>TD${returnBill.code}</p>
                        <p><span>客户名称：</span>${returnBill.name}</p>
                        <ul class="fr">
                            <li class="confirm-receipt">收货确认</li>
                            <li class="confirm-refund">退款确认</li>
                            <li class="back">退回</li>
                            <li class="print">打印</li>
                            <li class="export">导出</li>
                        </ul>
                    </div>
                    <table>
                        <thead>
                        <tr>
                            <td width="5%"><s class="chose-all"></s></td>
                            <td width="8%">商品图片</td>
                            <td width="36%">商品名称</td>
                            <td width="8%">订货价</td>
                            <td width="8%">数量</td>
                            <td width="8%">金额小计</td>
                            <td width="8%">退货价</td>
                            <td width="16%">备注</td>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${returnBillProducts}" var="product">
                        <tr>
                            <td width="5%"><s></s></td>
                            <td width="8%">
                                <div class="fl">
                                    <img src="${pageContext.request.contextPath}/img/1.jpg" alt="${product.productPhoto}"/>
                                </div>
                            </td>
                            <td width="36%">
                                <div class="detail fl">
                                    <p>
                                        <span class="special">${product.productLabel}</span>
                                        <span>p${product.productCode}</span>
                                    </p>
                                    <p>
                                        <span>现货供应45#无缝管 无缝钢管 价格合理 库存大 可加工定做</span>
                                        <span class="fr">规格:${product.productSpec}</span>
                                    </p>
                                    <p>${product.productStandard}</p>
                                </div>
                            </td>
                            <td width="8%">
                                ￥${product.orderPrice}
                            </td>
                            <td width="8%">
                                ${product.quantity}/${product.util}
                            </td>
                            <td width="8%">￥${product.subtotal}</td>
                            <td width="8%">
                                                                                    ￥ <input type="text" value="${product.price}"/>
                            </td>
                            <td width="16%">
                                <p>${product.productRemark}</p>
                            </td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div class="settle-accounts">
                        <div class="price fr">
                            <p>退款合计：<span>￥${returnBill.realAmount}</span></p>
                            <p>最终退款金额：￥<input type="text" value="${returnBill.amount}"/></p>
                        </div>
                        <div class="special-price fr">
                            <p>共计 <span>${returnBill.total}</span>件商品</p>
                        </div>
                    </div>
                    <div class="message clearfix">
                        <h3 class="fl">退款信息</h3>
                        <p class="fl">
                            <span class="contact">联系人：</span>
                            <span>${returnBill.contact}</span>
                            <span class="phone">联系电话：</span>
                            <span>${returnBill.tel}</span>
                            <span class="bank">开户银行：</span>
                            <span>${returnBill.bank}</span>
                            <span class="bank-name">开户名称：</span>
                            <span>${returnBill.accountName}</span>
                            <span class="bank-card">银行账号：</span>
                            <span>${returnBill.account}</span>
                        </p>
                    </div>
                    <div class="message clearfix">
                        <h3 class="fl">发货人信息</h3>
                        <p class="fl">
                            <span class="contact">联系人：</span>
                            <span>${returnBill.deliveryContact}</span>
                            <span class="phone">联系电话：</span>
                            <span>${returnBill.deliveryMobile}</span>
                            <span class="bank">发货地址：</span>
                            <span>${returnBill.deliveryAddress}</span>
                        </p>
                    </div>
                    <div class="message clearfix">
                        <h3 class="fl">收货人信息</h3>
                        <p>
                            <span class="contact">联系人：</span>
                            <span>${returnBill.receiptContact}</span>
                            <span class="phone">联系电话：</span>
                            <span>${returnBill.receiptMobile}</span>
                            <span class="bank">收货地址：</span>
                            <span>${returnBill.receiptAddress}</span>
                        </p>
                    </div>
                    <div class="select-box">
                        <span class="fl">退货仓库</span>
                        <div class="fl">
                            <input type="text" readonly class="show"/>
                            <span>▼</span>
                            <ul class="hide">
                            <c:forEach items="${warehouses}" var="w">
                                <li>${w.name}</li>
                            </c:forEach>    
                            </ul>
                        </div>
                    </div>
                    <div class="remark-message">
                        <h3>备注信息</h3>
                        <p>这是备注信息</p>
                    </div>
                    <div class="operation-log">
                        <span>操作日志▼</span>
                        <table class="hide">
                            <thead>
                                <tr>
                                    <td width="10%">操作时间</td>
                                    <td width="10%">操作人员</td>
                                    <td width="10%">操作类型</td>
                                    <td></td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>2017-10-15 14:27</td>
                                    <td>王兰兰</td>
                                    <td>订货单审核</td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td>2017-10-15 14:27</td>
                                    <td>王兰兰</td>
                                    <td>订货单审核</td>
                                    <td></td>
                                </tr>
                               <c:forEach items="${operationRecords}" var="oper">
                                <tr>
                                    <td><fmt:formatDate value="${oper.operateTime}" pattern="yyyy-MM-dd"/></td>
                                    <td>${oper.operaterUsername}</td>
                                    <td>${oper.operation}</td>
                                    <td></td>
                                </tr>
                                </c:forEach>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/goods_return_note.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>